export default function encrypt(data) {
    // 定义前端Key秘钥-需要注意 跟后端解密秘钥保持一直
      let key = '0123456789012345';
      key = CryptoJS.enc.Utf8.parse(key);
      let encrypted = CryptoJS.AES.encrypt(data, key, {
          mode: CryptoJS.mode.ECB,
          padding: CryptoJS.pad.Pkcs7
      }); 
      return CryptoJS.enc.Base64.stringify(CryptoJS.enc.Hex.parse(encrypted.ciphertext.toString()));
  }